package com.martini.satoken01.model;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author martini at 2021/12/17 9:35
 */
@Data
@Accessors(chain = true)
public class AjaxJson {
    private String msg;
    private Object data;
    private int code;

    public static AjaxJson success() {
        return new AjaxJson().setCode(0).setMsg("ok");
    }

    public static AjaxJson fail() {
        return new AjaxJson().setCode(1).setMsg("fail");
    }
}
